home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / etc / init.d / tails-reconfigure-memlockd < prev    next >
Encoding:
Text File  |  2013-01-06  |  1000 b   |  36 lines

  1. #! /bin/sh
  2. ### BEGIN INIT INFO
  3. # Provides:        tails-reconfigure-memlockd
  4. # Required-Start:    $local_fs
  5. # Required-Stop:    
  6. # Default-Start:        2 3 4 5
  7. # Default-Stop:        
  8. # X-Start-Before:       memlockd
  9. # Short-Description:    Reconfigure memlockd depending on running kernel
  10. # Description:          Reconfigure memlockd depending on running kernel
  11. ### END INIT INFO
  12.  
  13. PATH="/usr/local/bin:${PATH}"
  14. MEMLOCKD_CONF=/etc/memlockd.cfg
  15.  
  16. case "$1" in
  17.   start)
  18.     tails-boot-to-kexec kernel $(tails-get-bootinfo kernel) \
  19.         >> "$MEMLOCKD_CONF"
  20.     tails-boot-to-kexec initrd $(tails-get-bootinfo initrd) \
  21.         >> "$MEMLOCKD_CONF"
  22.  
  23.     # Tell sendsigs to forget about memlockd. Together with
  24.     # not calling 'memlockd stop' on shutdown, we have a
  25.     # strong chance that what tails-kexec needs will be available.
  26.     mkdir -p /lib/init/rw/sendsigs.omit.d
  27.     rm -f /lib/init/rw/sendsigs.omit.d/memlockd
  28.     ln -s /var/run/memlockd.pid /lib/init/rw/sendsigs.omit.d/memlockd
  29.     ;;
  30.   *)
  31.     echo "Usage: $0 start" >&2
  32.     exit 3
  33.     ;;
  34. esac
  35. exit 0
  36.